#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QProcess>
#include "jxlencoder.h"
#include "jxldecoder.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    //void on_pushButton_clicked();

    void on_select_clicked();

    void on_clearList_clicked();

    void on_clearLog_clicked();

    void on_outPutToSource_toggled(bool checked);

    void on_outPutPath_clicked();

    void on_select_3_clicked();

    void on_startEncode_3_clicked();

    void on_clearList_3_clicked();

    void on_clearLog_3_clicked();

    void on_outPutPath_3_clicked();

    void on_outPutToSource_3_toggled(bool checked);

    void on_startEncode_clicked(bool checked);

private:
    Ui::MainWindow *ui;

    QList<QWidget*> inputWidget;
    QList<QWidget*> inputWidget_3;

    QThread* EncoderThread;
    jxlEncoder *jxlencoder;
    int errTaskNum=0;
    QStringList inputFileList;
    int TaskNum;

    void encoderResult(int num,int result);
    void encoderLog(QString log);

    jxlDecoder *jxldecoder;
    int errTaskNum_3=0;
    QStringList inputFileList_3;

    void decoderResult(int num,int result);
    void decoderLog(QString log);


};
#endif // MAINWINDOW_H
